/**
 * Created by aaa on 2017/8/3.
 */
// module.exports = app => {
//         class PostsController extends app.Controller{
//                 * index(){
//                         this.ctx.body='hello world';
//                 }
//         }
//         return PostsController;
// }

//http://127.0.0.1:7001/api/posts
exports.index = function* (ctx) {
    ctx.body = {
        name:`hello`,
    };
};

//http://127.0.0.1:7001/api/posts/new
exports.new = function* (ctx) {
    ctx.body = {
        name:`new`,
    };
};

//http://127.0.0.1:7001/api/posts  post
exports.create = function* (ctx) {
    ctx.body = {
        name:`create`,
    };
};
exports.show = function* () {};
exports.edit = function* () {};
exports.update = function* () {};
exports.destroy = function* () {};
